package com.wc.alorithm_blue_bridge._动态规划.Q3362;

import java.util.*;

/**
 * @Author congege
 * @Description 建造房屋
 * https://www.lanqiao.cn/problems/3362/learning/?page=1&first_category_id=1
 * @Date Created in 2023/11/29-19:30
 */
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        int k = scan.nextInt();
        int mod = (int) 1e9 + 7;
        // dp[i][j] 表示前 i 行有 j 个房子的所有种类
        int[][] dp = new int[n + 1][m + k + 1];
        for (int i = 0; i <= k; i++) {
            dp[0][i] = 1;
        }

        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                for (int l = i - 1; l <= k; l++) {
                    dp[i][j + l] += dp[i - 1][l];
                    dp[i][j + l] %= mod;
                }
            }
        }

        System.out.println(dp[n][k]);
        scan.close();
    }
}
